#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSqlDatabase>
#include <PGNMove.h>
#include <PGNGameResult.h>

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
private:
    QSqlDatabase dBHandler;
    Ui::MainWindow *ui;
    unsigned int m_succesefulyAdded;
    unsigned int m_failedAdd;
    QStringList filesPaths;
    int addFile(QString path);
    QString findPlayer(QString name);
    QString addPlayer(QString name);
    QString convertResult(pgn::GameResult res);

private slots:
    void on_addBttn_clicked();
    void on_selectBttn_clicked();
};

#endif // MAINWINDOW_H
